package org.patchca.service;

import java.awt.Color;
import org.patchca.background.SingleColorBackgroundFactory;
import org.patchca.color.SingleColorFactory;
import org.patchca.filter.FilterFactory;
import org.patchca.font.RandomFontFactory;
import org.patchca.text.renderer.BestFitTextRenderer;
import org.patchca.word.AdaptiveRandomWordFactory;

public class SimpleCaptchaService extends AbstractCaptchaService
{
    public SimpleCaptchaService(int width, int height, Color textColor,
            Color backgroundColor, int fontSize, FilterFactory ff)
    {
        this.backgroundFactory = new SingleColorBackgroundFactory(
                backgroundColor);
        this.wordFactory = new AdaptiveRandomWordFactory();
        this.fontFactory = new RandomFontFactory();
        this.textRenderer = new BestFitTextRenderer();
        this.colorFactory = new SingleColorFactory(textColor);
        this.filterFactory = ff;
        this.width = width;
        this.height = height;
    }

    public SimpleCaptchaService(int width, int height, Color textColor,
            Color backgroundColor, int fontSize, String[] fontNames,
            FilterFactory ff)
    {
        this.backgroundFactory = new SingleColorBackgroundFactory(
                backgroundColor);
        this.wordFactory = new AdaptiveRandomWordFactory();
        this.fontFactory = new RandomFontFactory(fontNames);
        this.textRenderer = new BestFitTextRenderer();
        this.colorFactory = new SingleColorFactory(textColor);
        this.filterFactory = ff;
        this.width = width;
        this.height = height;
    }

    public Captcha getCaptcha()
    {
        return null;
    }
}
